﻿@model ZhongheCms.Models.GswTblContent
@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_Layout.cshtml";
   
}

<div class="row">
    <div class="col-xs-12 col-sm-12 widget-container-col">
        @using (Html.BeginForm("Create", "FrdLinkNoPic", new { id = Model.Id, ViewBag.m, ViewBag.f, ViewBag.p, ViewBag.fid, ViewBag.sdate, ViewBag.edate, ViewBag.keywords }, FormMethod.Post,
            new { name = "myForm", id = "myForm", @class = "form-horizontal", role = "form" }))
        {
            <div class="widget-box">
                <div class="widget-header">
                    <h5 class="widget-title">@ViewBag.f  @if (!string.IsNullOrEmpty(ViewBag.p))
                                                         {
                            <span>(@ViewBag.p)</span>
                                                         }</h5>

                    <div class="widget-toolbar">
                    </div>
                </div>

                <div class="widget-body">


                    <div class="widget-main">

                        <div class="form-group">
                            <table id="sample-table-1" class="table table-bordered ">
                                <tbody>
                                    <tr>
                                        <td class="align-right" style="width: 15%; background: #f6f6f6">编号
                                        </td>
                                        <td>

                                            <input type="text" id="ContentNo" name="ContentNo" placeholder="" class="col-xs-10 col-sm-5" data-val-number="编号为非法的数字格式" data-val-regex="编号为非法的数字格式"
                                                   data-val-regex-pattern="^(-?\d+)(\.\d+)?$" data-val-required="编号为非法的数字格式" value="@Model.ContentNo" />
                                             <span class="field-validation-valid help-block" data-valmsg-for="ContentNo" data-valmsg-replace="true"></span>

                                        </td>
                                        
                                    </tr>
                                    
                                    <tr>
                                         <td class="align-right" style="width: 15%; background: #f6f6f6">名称
                                        </td>
                                        <td >
                                            <input  id="ContentTitle" name="ContentTitle" placeholder="" type="text" class="col-xs-12 col-sm-6" value="@Model.ContentTitle" data-val="true" data-val-required="字段不允许为空" />
                                            <span class="field-validation-valid help-block" data-valmsg-for="ContentTitle" data-valmsg-replace="true"></span>
                                        </td>
                                       
                                    </tr>
                                    <tr>
                                         <td class="align-right" style="width: 15%">网址
                                        </td>
                                        <td>
                                            <input  id="ContentBrief" name="ContentBrief" placeholder="示例:http://www.zhongheweb.com" type="text" class="col-xs-12 col-sm-6" value="@Model.ContentBrief" data-val="true" data-val-required="字段不允许为空" />
                                            <span class="field-validation-valid help-block" data-valmsg-for="ContentBrief" data-valmsg-replace="true"></span>
                                        </td>
                                    </tr>
                                 
                                    

                                   
                                </tbody>
                            </table>
                        </div>


                        @if (ViewBag.scode == "1")
                        {
                            <div class="hr hr-2 dotted"></div>
                            <div class="alert alert-success">
                                <button type="button" class="close" data-dismiss="alert">
                                    <i class="icon-remove"></i>
                                </button>

                                <strong>
                                    <i class="icon-ok"></i>
                                    提示信息
                                </strong>

                                信息保存成功!
																
                            </div>
                        }
                        @if (ViewBag.scode == "0")
                        {
                            <div class="hr hr-2 dotted"></div>
                            <div class="alert alert-danger">
                                <button type="button" class="close" data-dismiss="alert">
                                    <i class="icon-remove"></i>
                                </button>

                                <strong>
                                    <i class="icon-remove"></i>
                                    错误提示
                                </strong>

                                @Html.ValidationSummary(true)

                            </div>

                        }
                        <div class="clearfix form-actions">
                            <div class="col-md-offset-3 col-md-9">
                                <button class="btn btn-info" type="submit">
                                    &nbsp;&nbsp;<i class="ace-icon fa fa-check bigger-110"></i>
                                    保存&nbsp;&nbsp;
                                </button>

                                &nbsp; &nbsp; &nbsp;
                                <button class="btn" type="button" onclick="funBack()">
                                    &nbsp;&nbsp;<i class="ace-icon fa fa-undo bigger-110"></i>
                                    返回&nbsp;&nbsp;
                                </button>
                            </div>
                        </div>




                    </div>



                </div>

            </div>
        }

    </div>


</div>
@section js{
    <script src="/assets/js/jquery.validate.min.js"></script>
    <script src="/assets/js/jquery.validate.unobtrusive.js"></script>
    <script src="/assets/js/jquery.validate.unobtrusive.bootstrap.js"></script>
   
   
  
    <script type="text/javascript">
    


     
        function funBack() {
            document.location = "/FrdLinkNoPic/Index/0?m=@ViewBag.m&f=@ViewBag.f&p=@ViewBag.p&fid=@ViewBag.fid&keywords=@ViewBag.keywords";
        }
    </script>
}
